import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { addToCart } from '../redux/actions/demo';

class Templete extends Component {
  constructor(props) {
    super(props);
    this.state = {
    };
  }
  render() {
    return (
      <div>
        Templete
      </div>
    );
  }
}

const mapStateToProps = (state) => {
  return {
    demo: state.demo,
  }
}
// redux 绑定dispath
const mapDispatchToProps = (dispatch) => {
  return {
    addToCart: bindActionCreators(addToCart, dispatch)
  }
}

Templete = connect(mapStateToProps, mapDispatchToProps)(Templete)

export default Shop;
